package com.study.mqtt.consumer;

import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.stereotype.Component;

import com.study.mqtt.config.MqttMessageConsumer;
import com.study.mqtt.config.MqttMessageListener;

import lombok.extern.slf4j.Slf4j;

@MqttMessageListener(topic = "test/topic",qos = 2)
@Slf4j
@Component
public class TestMqttMessageConsumer implements MqttMessageConsumer {

	@Override
	public void consume(String topic, MqttMessage mqttMessage) {
		log.info("消息消费:{},{}", topic, mqttMessage);
	}

}
